﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Internal.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    物料出库
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptStyleCOntent" runat="server">
    <script type="text/javascript">
        $("#poCode").ready(function () {
            document.getElementById("poCode").focus();
            setTimeout(function () {
                $("#poCode").attr("value", "10000200000103");
            }, 3500);
            setTimeout(function () {
                $("#inputCode").hide();
                $("#banner").show();
                $("#OperationScreen").show();
            }, 4000);
            setTimeout(function () {
                $("#materialList").show();
            }, 5000);
            setTimeout(function () {
                $("#amount").html("2");
            }, 7000);
            setTimeout(function () {
                $("#amount").html("3");
            }, 9000);
            setTimeout(function () {
                $("#materialList2").show();
            }, 12000);
            setTimeout(function () {
                $("#amount2").html("2");
            }, 15000);
        });

        function modifyAmount(containerId, txtId, obj) {
            $("#" + containerId).hide();
            $("#" + txtId).show().attr("value", $("#" + containerId).html());
            document.getElementById(txtId).focus();
            $("#" + txtId).focusout(goBackHandler(containerId, txtId, obj));
        }

        function goBackHandler(containerId, txtId, obj) {
            return function () {
                $("#" + txtId).hide();
                $("#" + containerId).show();
                $("#" + containerId).html($("#" + txtId).val());
            }
        }

        function confirmAction() {
            alert("物料出库申请提交,等待审核!");
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="inputCode" style="width: 100%; height: 200px; line-height: 200px; text-align: center;">
        请刷条码&nbsp;&nbsp;<input id="poCode" type="text" />
    </div>
    <div id="banner" style="display: none;">
        物料列表:
    </div>
    <div id="OperationScreen" style="display: none;">
        <table cellpadding="10">
            <thead>
                <tr>
                    <td>
                        物料型号
                    </td>
                    <td>
                        数量
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr id="materialList" style="display: none;">
                    <td>
                        <span>0.15mm蚀刻铜片</span>
                    </td>
                    <td>
                        <span id="amount">1</span>
                        <input id="textAmount" type="text" size="5" style="display: none;" />
                    </td>
                    <td>
                        <a href="#" onclick="modifyAmount('amount','textAmount',this);">编辑数量</a>
                    </td>
                </tr>
                <tr id="materialList2" style="display: none;">
                    <td>
                        <span>圆管</span>
                    </td>
                    <td>
                        <span id="amount2">1</span>
                        <input id="textAmount2" type="text" size="5" style="display: none;" />
                    </td>
                    <td>
                        <a href="#" onclick="modifyAmount('amount2','textAmount2',this);">编辑数量</a>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
            <input type="button" value="确认出库" onclick="confirmAction()" />
        </p>
    </div>
</asp:Content>
